CC=msp430-gcc
CFLAGS=-Os -Wall -g -mmcu=msp430g2452
IFLAGS= -I./include/

OBJS=main.o
SRCOBJS=./src/pwm.o ./src/sample.o ./src/heater.o ./src/ui.o

all: $(OBJS) $(SRCOBJS)
	cd src; make
	$(CC) $(CFLAGS) -o main.elf $(OBJS) $(SRCOBJS)

%.o: %.c
	$(CC) $(IFLAGS) $(CFLAGS) -c $<

clean:
	cd src; make clean
	rm -f main.elf *.o
